﻿namespace LinkedInWinRT.Helpers
{
    using System.Xml.Linq;

    public static class Extensions
    {
        public static string GetElementValue(this XElement element)
        {
            if (element != null) return element.Value;
            return string.Empty;
        }

        public static bool IsValidEmail(this string emailAddress)
        {
            if (!string.IsNullOrEmpty(emailAddress) && emailAddress.Contains("@") && emailAddress.Contains("."))
                return true;
            return false;
        }
    }
}
